﻿@model TruckingApplication.Dal.EntityModels.ORDER

@{
    ViewBag.Title = "Details";
}
@(Html.Kendo().DatePicker().Name("Date"))
<br /><h2>Order Details</h2>

<fieldset>
    <table id="tableMgmt" style="width: 100%;">
        <tr>
            <th>
                @Html.LabelFor(model => model.orderNum)
            </th>
            <td>
                @Model.orderNum
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.gross)
            </td>
            <td>
                @Model.gross
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.net)
            </td>
            <td>
                @Model.net
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.carrierRate)
            </td>
            <td>
                @Model.carrierRate
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.max)
            </td>
            <td>
                @Model.max
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.paidStatus)
            </td>
            <td>
                @Model.paidStatus
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.dueDate)
            </td>
            <td>
                @Model.dueDate
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.mileage)
            </td>
            <td>
                @Model.mileage
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.deadHeadMileage)
            </td>
            <td>
                @Model.deadHeadMileage
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.quickPay)
            </td>
            <td>
                @Model.quickPay
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.lumperFee)
            </td>
            <td>
                @Model.lumperFee
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.brokerID)
            </td>
            <td>
                @ViewBag.Broker
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.carrierID)
            </td>
            <td>
                @ViewBag.Carrier
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.pickupCity)
            </td>
            <td>
                @Model.pickupCity
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.pickupState)
            </td>
            <td>
                @Model.pickupState
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.dropOffCity)
            </td>
            <td>
                @Model.dropOffCity
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.dropOffState)
            </td>
            <td>
                
                @Model.dropOffState
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.statusID, "Order Status")
            </td>
            <td>
                @ViewBag.Status
            </td>
        </tr>
        <tr>
            <td>
                @Html.LabelFor(model => model.notes)
            </td>
            <td>
                @Model.notes
            </td>
        </tr>
        @foreach (var orderAdvance in Model.ORDER_ADVANCE) { 
            <tr style="border-top:2px solid blue;">
                <td>
                    Advance Type
                </td>
                <td>
                    @orderAdvance.ADVANCE.type
                </td>
            </tr>
            <tr>
                <td>
                    Amount
                </td>
                <td>
                    @orderAdvance.ADVANCE.amount
                </td>
            </tr>
            <tr style="border-bottom:2px solid blue;">
                <td>
                    Reference Number
                </td>
                <td>
                    @orderAdvance.ADVANCE.referenceNumber
                </td>
            </tr>
        }
    </table>
</fieldset>
<p>
    @Html.ActionLink("Back to List", "Dashboard", "Account", null, new { @class = "button default btnLarge" })
    @Html.ActionLink("Edit", "Edit", new { id = Model.orderID }, new { @class="button default btnLarge"})
    @*@Html.ActionLink("Delete", "Delete", new { id = Model.orderID }, new { @class = "button default btnLarge" })*@
</p>
